package com.yanxu.proxy.mybatis_proxy;


import com.yanxu.proxy.base.Order;
import com.yanxu.proxy.mybatis_proxy.mapper.OrderMapper;
import com.yanxu.proxy.mybatis_proxy.mapper.UserMapper;

import java.util.HashMap;

/**
 * @author 折戟沉沙铁未销
 * @version V1.0
 * @date 2025/4/15-2025
 * @Description: 测试类
 */
public class Test {
    public static void main(String[] args) {
        MapperProxyFactory mapperProxyFactory = new MapperProxyFactory();

        UserMapper proxy1 = (UserMapper) mapperProxyFactory.getProxy(UserMapper.class);
        proxy1.saveUser(new HashMap<>());

        System.out.println("-----------------------------------------------------------");

        OrderMapper proxy2 = (OrderMapper) mapperProxyFactory.getProxy(OrderMapper.class);
        proxy2.saveOrder(new Order());
    }
}